using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Beauty.Net.Kafka
{

    /// <summary>
    /// Kafka 消息实现
    /// </summary>
    public class KafkaMessage : IKafkaMessage
    {
        /// <summary>
        /// 获取或设置消息的键
        /// </summary>
        public string Key { get; set; } = string.Empty;

        /// <summary>
        /// 获取或设置消息的值
        /// </summary>
        public string Value { get; set; } = string.Empty;

        /// <summary>
        /// 获取或设置消息的头部信息集合，使用键值对形式存储
        /// </summary>
        public Dictionary<string, object> Headers { get; set; } = new Dictionary<string, object>();

        /// <summary>
        /// 获取或设置消息的分区号，可为null
        /// </summary>
        public int? Partition { get; set; }

        /// <summary>
        /// 获取或设置消息的时间戳，可为null
        /// </summary>
        public long? Timestamp { get; set; }
    }
}

